#include <GL/glut.h>
#include <iostream>
#include "screens.h"
#include "externs.h"
#include "../draw.h"
using namespace std;


void TurnScreen::display(void)
{

	glClearColor(0,0,0,0);
	glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );

	glColor3f(1,1,1);
	if(playerId==0)
		Draw::Text(300,275,"Turn For Player1",-1,BIGGER);
	else if(playerId==1)
		Draw::Text(300,275,"Turn For Player2",-1,BIGGER);

  	glutSwapBuffers();
}

void TurnScreen::keyboard(unsigned char key,int x, int y)
{
	if(key==13)
	{
		cout << "enter'a bastin" << endl;
		screenMode=GAMEPLAY;
		gameplay->setPlayerId(playerId);
		++playerId%=2;
		gameplay->start();
		glutPostRedisplay();
	}
}

void TurnScreen::special(int key,int x, int y)
{}

void TurnScreen::specialUp(int key,int x, int y)
{}

void TurnScreen::keyboardUp(unsigned char key,int x, int y)
{}

void TurnScreen::mouse(int button, int state,int x, int y)
{}

void TurnScreen::motion(int x, int y)
{}
void TurnScreen::passiveMotion(int x, int y)
{

}
